#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "DirectedRelationship.h"
#include "NamedElement.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class UseCase;

/// <summary>
/// Include
/// An Include relationship specifies that a UseCase contains the behavior defined
/// in another UseCase.
/// </summary>
class UMLMODEL_EXPORT Include : public DirectedRelationship, public NamedElement {

public: // Constructors and destructors
    explicit Include(const QString& umlType="uml::Include");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// addition getter
    /// The UseCase that is to be included.
    /// </summary>
    shared_ptr<UseCase> addition() const;

    /// <summary>
    /// addition setter
    /// The UseCase that is to be included.
    /// </summary>
    void setAddition(shared_ptr<UseCase> value);

    /// <summary>
    /// includingCase getter
    /// The UseCase which includes the addition and owns the Include relationship.
    /// </summary>
    shared_ptr<UseCase> includingCase() const;

    /// <summary>
    /// includingCase setter
    /// The UseCase which includes the addition and owns the Include relationship.
    /// </summary>
    void setIncludingCase(shared_ptr<UseCase> value);

private: // Fields
    /// <summary>
    /// addition
    /// The UseCase that is to be included.
    /// </summary>
    shared_ptr<UseCase> addition_;

    /// <summary>
    /// includingCase
    /// The UseCase which includes the addition and owns the Include relationship.
    /// </summary>
    shared_ptr<UseCase> includingCase_;

};

} // namespace uml
